#ifndef RELOCATION_SLAM_MAPPOINTS_H
#define RELOCATION_SLAM_MAPPOINTS_H

#include "Frame.h"
namespace Relocation_Slam{
    /**
 * @brief MapPoint是一个地图点
 */
    class MapPoint
    {
    public:
        MapPoint(const cv::Mat &Pos, Frame* pRefKF,int id,int featureId);

        void AddObservation(Frame* pF,size_t idx);

        std::map<Frame*,int> GetObservations();


    public:
        int mnId; ///< Global ID for MapPoint

        int mnFirstFrame; ///< 创建该MapPoint的帧ID（即每一关键帧有一个帧ID）

        double mPose[3]; ///< MapPoint在世界坐标系下的坐标

        std::map<Frame*,int> mObservations; ///< 观测到该MapPoint的KF和该MapPoint在KF中的索引

        int nObs; ///< 被观测到的次数

        cv::Mat mNormalVector;

        cv::Mat mDescriptor; ///< 通过 ComputeDistinctiveDescriptors() 得到的最优描述子

        bool mbBad;
    };
}
#endif //RELOCATION_SLAM_MAPPOINTS_H
